package com.my.study;

public enum  OperationEnum {

    PLUS("+"){double apply(double x, double y) {return x + y;}},
    MINUS("/"){double apply(double x, double y) {return x - y;}},
    MULTIPLY("*"){double apply(double x, double y) {return x * y;}},
    DIVIDE("/"){double apply(double x, double y) {return x / y;}};


    private String operation;


    OperationEnum(String operation) {
        this.operation = operation;
    }

    abstract double apply(double x, double y);

}
